/**
 * Created by Administrator on 2018/api/11/api/28 0028.
 */
import {getRequest, postRequest} from './api'

// 获取授权地址
export const getAuthorUrl = (params) => {
  return postRequest('/api/author.rm', params)
};

// 获取openId地址
export const getOpenInfo = (params) => {
  return postRequest('/api/get_openInfo.rm', params)
};

//用户是否注册过
export const userIsExist = (params) => {
  return postRequest('/api/user_isexist.rm', params)
};
export const getAgreement = (params) => {
  return postRequest('/api/user_get_agreement.rm', params)
};
//手机验证码注册登录
export const fastregister = (params) => {
  return postRequest('/api/user_fast_register.rm', params)
};
//注册或登录
export const registerLogin = (params) => {
  return postRequest('/api/user_register_login.rm', params)
};
//跳过推荐卡种
export const jumpRecommendVipcard = (params) => {
  return postRequest('/api/user_jump_RecommendVipcard.rm', params)
};
// 登陆
export const login = (params) => {
  return postRequest('/api/login', params)
};
// 获取用户登录信息
export const userInfo = (params) => {
  return postRequest('/api/get_userinfo.rm', params)
};


//* 首页模块 *//

//首页数据
export const initHomeData = (params) => {
  return postRequest('/api/home_data.rm', params)
};

// 个人消息
export const getMyMessageList = (params) => {
  return postRequest('/api/user_messageList.rm', params)
};

//更新消息状态
export const updateMessage = (params) => {
  return postRequest('/api/user_update_message.rm', params)
};

// 系统消息
export const getSysMessageList = (params) => {
  return postRequest('/api/get_sys_messageList.rm', params)
};

// 系统消息详情
export const getMessageInfoDetail = (params) => {
  return postRequest('/api/get_messageInfo_detail.rm', params)
};

//首次推荐卡种
export const recommendVipcard = (params) => {
  return postRequest('/api/recommend_vipcardlist.rm', params)
};

//贵宾厅数据
export const viproomData = (params) => {
  return postRequest('/api/get_viproomlist.rm', params)
};

//贵宾厅详情
export const getViproomDetail = (params) => {
  return postRequest('/api/viproom_detail.rm', params)
};

//会员预约贵宾厅
export const appointmentViproom = (params) => {
  return postRequest('/api/appointment_viproom.rm', params)
};

//校验预约时间
export const checkAppointmentTime = (params) => {
  return postRequest('/api/check_appointment_time.rm', params)
};

//贵宾通道数据
export const viponlyData = (params) => {
  return postRequest('/api/get_viponlylist.rm', params)
};

//贵宾通道详情
export const getViponlyDetail = (params) => {
  return postRequest('/api/get_viponly_detail.rm', params)
};

//首页图文配置
export const indexConfig = (params) => {
  return postRequest('/api/user_index_config.rm', params)
};

//易登机
export const yidengji = (params) => {
  return postRequest('/api/user_boarding_service.rm', params)
};

//要客服务
export const yaokefuwu = (params) => {
  return postRequest('/api/user_guest_service.rm', params)
};

//网上值机
export const checkin = (params) => {
  return postRequest('/api/user_checkin.rm', params)
};

//延误保障
export const delaybaozhang = (params) => {
  return postRequest('/api/user_delay_guarantee.rm', params)
};

//快速登机
export const kuaisudengji = (params) => {
  return postRequest('/api/user_speedy_boarding.rm', params)
};

//会员折扣
export const huiyuanzhekou = (params) => {
  return postRequest('/api/user_vip_discounts.rm', params)
};

//出行预定
export const getPlaneTicket = (params) => {
  return postRequest('/api/get_plane_ticket.rm', params)
};

//礼品卡种
export const giftVipcard = (params) => {
  return postRequest('/api/gift_vipcardlist.rm', params)
};

//贵宾卡种
export const getVipcard = (params) => {
  return postRequest('/api/get_vipcard.rm', params)
};

//卡种详情
export const getVipcardDetail = (params) => {
  return postRequest('/api/get_vipcard_detail.rm', params)
};

//要客卡种
export const getGuestcard = (params) => {
  return postRequest('/api/get_guestcard.rm', params)
};

//物品分类码
export const getCategoryCode = (params) => {
  return postRequest('/api/get_category_code.rm', params)
};

//* 扫码验证模块 *//

//可扫码物品
export const getCanScanGoods = (params) => {
  return postRequest('/api/get_usercan_sacn.rm', params)
};

//生成数字码和二维码
export const createUserGoodscode = (params) => {
  return postRequest('/api/create_user_goodscode.rm', params)
};

//贵宾厅 贵宾通道预约
export const appointmentSub = (params) => {
  return postRequest('/api/appointment_infosub.rm', params)
};

// 商城模块 //

//商城数据
export const initMallData = (params) => {
  return postRequest('/api/mall_data.rm', params)
};

//商城导航栏 商品list
export const getGoodsList = (params) => {
  return postRequest('/api/mall_goodslist.rm', params)
};

//商城 搜索
export const getSearchGoodsList = (params) => {
  return postRequest('/api/get_search_goodslist.rm', params)
};

//商品数据
export const getGoodDetail = (params) => {
  return postRequest('/api/goods_detail.rm', params)
};

//商品 更多
export const getMoreGoodsList = (params) => {
  return postRequest('/api/mall_hot_recommend.rm', params)
};

//商品 加入购物车
export const addToShoppingcart = (params) => {
  return postRequest('/api/add_to_shoppingcart.rm', params)
};

//商品 更新购物车数据
export const updateMyShoppingcart = (params) => {
  return postRequest('/api/update_my_shoppingcart.rm', params)
};

//商品 删除购物车数据
export const deleteFromMyshoppingcart = (params) => {
  return postRequest('/api/delete_from_myshoppingcart.rm', params)
};

//商品 购物车数据
export const getShoppingcartGoodsList = (params) => {
  return postRequest('/api/get_shoppingcart_goodslist.rm', params)
};


//订单数据
export const getOrderList = (params) => {
  return postRequest('/api/get_order_list.rm', params)
};

//订单详情数据
export const getOrderDetail = (params) => {
  return postRequest('/api/get_order_detail.rm', params)
};

//订单详情购买数量为1
export const getAccountGoods = (params) => {
  return postRequest('/api/get_accountgoods.rm', params)
};


//线下订单
export const orderPayunderCheck = (params) => {
  return postRequest('/api/order_payunder_check.rm', params)
};

//延误险信息
export const getDelayriskDetail = (params) => {
  return postRequest('/api/get_delayrisk_detail.rm', params)
};

//延误险理赔提交
export const delayriskSub = (params) => {
  return postRequest('/api/user_delayrisk_sub.rm', params)
};

//延误险理赔详情
export const delayriskInsurantDetail = (params) => {
  return postRequest('/api/user_delayrisk_insurant_detail.rm', params)
};

//预约详情
export const getAppointmentOrderDetail = (params) => {
  return postRequest('/api/user_order_appointment_detail.rm', params)
};


//* 我的 *//

//用户详细信息
export const getUserInfoDetail = (params) => {
  return postRequest('/api/get_user_detailinfo.rm', params)
};

//用户详细信息
export const queryUserVipCard = (params) => {
  return postRequest('/api/query_user_vipcard.rm', params)
};

//获取验证码
export const getSmscode = (params) => {
  return postRequest('/api/user_get_smscode.rm', params)
};

//校验原手机号
export const checkOldPhone = (params) => {
  return postRequest('/api/check_old_phone.rm', params)
};

//换绑手机号
export const changePhone = (params) => {
  return postRequest('/api/change_bind_phone.rm', params)
};

//更换紧急手机号
export const changeTelePhone = (params) => {
  return postRequest('/api/change_telephone.rm', params)
};

//修改头像
export const updateUserhead = (params) => {
  return postRequest('/api/user_image_upload.rm', params)
};

//图片上传
export const imgUpload = (params) => {
  return postRequest('/api/user_upload_img.rm', params)
};

//证件识别上传
export const imgOcrUpload = (params) => {
  return postRequest('/api/user_getOcrInfo.rm', params)
};


//我的贵宾卡
export const getMyguibinka = (params) => {
  return postRequest('/api/get_user_vipcard.rm', params)
};

//贵宾卡完善资料
export const goPerfectVipcard = (params) => {
  return postRequest('/api/user_perfect_vipcard.rm', params)
};

//贵宾卡权益详情
export const getVipcardServerDetail = (params) => {
  return postRequest('/api/get_user_vipcard_detail.rm', params)
};

//我的体验券
export const getUserTiyanVipcard = (params) => {
  return postRequest('/api/get_user_tiyan_vipcard.rm', params)
};

//我的体验券赠送
export const giveTiyanVipcard = (params) => {
  return postRequest('/api/give_tiyan_vipcard.rm', params)
};

//未使用
export const getAccountGoodsListNotUsed = (params) => {
  return postRequest('/api/get_accountgoodslist_notused.rm', params)
};

//客服
export const getKefuinfo = (params) => {
  return postRequest('/api/get_customer_servicedesc.rm', params)
};

//礼品卡
export const getUserGiftcard = (params) => {
  return postRequest('/api/get_user_giftcard.rm', params)
};

//礼品卡激活
export const activateGiftcard = (params) => {
  return postRequest('/api/activate_user_giftcard.rm', params)
};

//礼品卡转赠
export const giveGiftcard = (params) => {
  return postRequest('/api/give_user_giftcard.rm', params)
};

//礼品卡微信分享详情
export const shareGiftcard = (params) => {
  return postRequest('/api/share_user_giftcard.rm', params)
};

//老会员专属优惠
export const oldVipDiscount = (params) => {
  return postRequest('/api/continue_vipcardlist.rm', params)
};

//常用信息  旅客
export const passengerListInfo = (params) => {
  return postRequest('/api/get_passenger_list.rm', params)
};

//新增旅客
export const addPassengerInfo = (params) => {
  return postRequest('/api/add_passenger_info.rm', params)
};

//删除旅客
export const delPassengerInfo = (params) => {
  return postRequest('/api/del_passenger_info.rm', params)
};

//旅客详情
export const getPassengerInfo = (params) => {
  return postRequest('/api/get_passenger_info.rm', params)
};


//常用信息  地址
export const addressListInfo = (params) => {
  return postRequest('/api/get_address_list.rm', params)
};

//常用信息  新增地址
export const addAddressInfo = (params) => {
  return postRequest('/api/add_address_info.rm', params)
};

//常用信息  地址详情
export const addressDetailinfo = (params) => {
  return postRequest('/api/address_detailinfo.rm', params)
};

//常用信息  删除地址
export const delAddress = (params) => {
  return postRequest('/api/del_address.rm', params)
};

//常用信息  联系人
export const contactsListInfo = (params) => {
  return postRequest('/api/get_contacts_list.rm', params)
};

//常用信息  新增联系人
export const addContactInfo = (params) => {
  return postRequest('/api/add_contact_info.rm', params)
};

//常用信息  联系人详情
export const contactsDetailinfo = (params) => {
  return postRequest('/api/contacts_detailinfo.rm', params)
};

//常用信息  删除联系人
export const delDontacts = (params) => {
  return postRequest('/api/del_contacts.rm', params)
};

//我的积分
export const userIntegral = (params) => {
  return postRequest('/api/user_integral_info.rm', params)
};

//我的 积分商城
export const userIntegralExchange = (params) => {
  return postRequest('/api/user_integral_mall.rm', params)
};

//我的 兑换产品
export const exchangeGoods = (params) => {
  return postRequest('/api/user_integral_exchange_goods.rm', params)
};

//我的 兑换产品记录
export const exchangeGoodsLog = (params) => {
  return postRequest('/api/user_integral_exchange.rm', params)
};

//我的积分记录
export const userIntegralLog = (params) => {
  return postRequest('/api/user_integrallog_info.rm', params)
};

//投诉与建议
export const getQuestionListInfo = (params) => {
  return postRequest('/api/get_question_list.rm', params)
};

//新增问题
export const addQuestion = (params) => {
  return postRequest('/api/add_question_info.rm', params)
};

//商务合作
export const businessCooperation = (params) => {
  return postRequest('/api/get_business_cooperation.rm', params)
};

// 转卡费用
export const getTransferCardFee = (params) => {
  return postRequest('/api/get_transferCard_fee.rm', params)
};

//其他更多  转卡
export const transferCardList = (params) => {
  return postRequest('/api/can_transfer_cardlist.rm', params)
};

//其他更多  关于我们
export const aboutUs = (params) => {
  return postRequest('/api/get_about_us.rm', params)
};


//获取支付配置
export const getOrderPayConfig = (params) => {
  return postRequest('/api/get_order_pay_config.rm', params)
};

//订单提交
export const orderSubmit = (params) => {
  return postRequest('/api/order_submit.rm', params)
};

//订单支付提交
export const orderGoPay = (params) => {
  return postRequest('/api/order_pay_sub.rm', params)
};

//得到订单支付结果
export const orderPayResult = (params) => {
  return postRequest('/api/order_pay_result.rm', params)
};

//删除订单
export const orderDel = (params) => {
  return postRequest('/api/order_del.rm', params)
};

//保存电子签名
export const saveSign = (params) => {
  return postRequest('/api/user_save_sign.rm', params)
};

//签名和卡种详情
export const getSignVipcardDetail = (params) => {
  return postRequest('/api/get_sign_vipcard_detail.rm', params)
};

//坐标转换
export const getMapInfo = (params) => {
  params['ak'] = 'iExde9KXwNrIHgZU4CzUCCYsQ7Ues96I';
  params['output'] = 'json';
  params['pois'] = 1;
  params['latest_admin'] = 1;
  return getRequest('/geocoder/v2/', params)
};

//有贵宾厅的机场数据
export const getAirportListViproom = (params) => {
  return postRequest('/api/get_airportListViproom.rm', params)
};

//机场贵宾厅数据
export const getViproomListAirport = (params) => {
  return postRequest('/api/get_viproomListAirport.rm', params)
};

//有贵宾厅的高铁数据
export const getHighSpeedTrainList = (params) => {
  return postRequest('/api/get_highSpeedTrainList.rm', params)
};

//高铁贵宾厅数据
export const getViproomListTrain = (params) => {
  return postRequest('/api/get_viproomListTrain.rm', params)
};

//有贵宾通道的机场数据
export const getAirportListViponly = (params) => {
  return postRequest('/api/get_airportListViponly.rm', params)
};


//贵宾厅详情
export const getViproomDetail1 = (params) => {
  return postRequest('/api/viproom_detail1.rm', params)
};

//合作商家数据
export const getAirportListShop = (params) => {
  return postRequest('/api/get_airportListShop.rm', params)
};
//合作商家数据
export const getShopList = (params) => {
  return postRequest('/api/get_shopList.rm', params)
};

//合作商家详情
export const getShopDetail = (params) => {
  return postRequest('/api/get_shopDetail.rm', params)
};




